package com.wuming.house.service;

import com.wuming.house.core.BusinessException;
import com.wuming.house.model.House;
import com.wuming.house.model.WeixinUser;

import java.util.List;

public interface HouseService {

    /**
     * 保存房产信息
     *
     * @param house 房产信息
     * @throws BusinessException
     */
    void saveHouse(House house) throws BusinessException;

    /**
     * 修改房产信息
     *
     * @param house 房产信息
     * @throws BusinessException
     */
    void modifyHouse(House house) throws BusinessException;

    /**
     * 删除楼盘信息
     *
     * @param id 楼盘id
     * @throws BusinessException
     */
    void removeHouseById(Long id) throws BusinessException;

    /**
     * 根据id查询房产
     *
     * @param id 房产id
     * @return 房产信息
     * @throws BusinessException
     */
    House getHouseById(Long id) throws BusinessException;


    /**
     * 根据楼盘名称查询楼盘信息
     *
     * @param name      楼盘名称
     * @param pageIndex
     * @param pageSize
     * @return 微信用户
     */
    List<House> getHouseByPage(String name, int pageIndex, int pageSize) throws BusinessException;

    /**
     * 查询总数
     *
     * @param name 楼盘名称
     * @return
     */
    int getTotal(String name) throws BusinessException;
}
